<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>绑定class三元表达式</title>
    <script src = "/js/vue.js"></script>
    <style>
        .active{
            text-decoration: underline;
        }
        .text-danger{
            font-weight: hold;
        }
    </style>
</head>
<body>
    <div id ="app">
        <div v-bind:class="[isActive ? 'active' : '','text-danger']">Hello School!</div>
    </div>
</body>
<script>
    var vm = new Vue({
        el:'#app',
        data:{
         isActive:true
        }
    })
</script>
</html>